package com.xuecheng.content.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xuecheng.content.entity.Teachplan;
import com.xuecheng.content.entity.ext.TeachPlanNode;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 课程计划 Mapper 接口
 * </p>
 *
 * @author 杨佳畅
 */
public interface TeachplanMapper extends BaseMapper<Teachplan> {

    List<TeachPlanNode> selectTreeNodeByCourseId(Long courseId);

    @Select("select max(orderby) as aOrderBy from teachplan where parentid = #{parentId}")
    Integer selectOrderByParentId(Long parentId);

}
